/**
 * There are <a href="https://github.com/thinkgem/jeesite">JeeSite</a> code generation
 */
package com.chlitina.store.modules.expert.entity;

import com.chlitina.store.common.persistence.BaseEntity;
import com.chlitina.store.modules.sys.entity.StoreType;

/**
 * 解决方案与产品复合主键
 * @author lvbo
 * @version 2013-06-08
 */
public class SolutionFaceProductMixStoreTypePK extends BaseEntity {
	
	private static final long serialVersionUID = 1L;
	private SolutionFaceProductMix solutionFaceProductMix; 	// 方案
	private StoreType storeType;	// 店面类型

	public SolutionFaceProductMixStoreTypePK() {
	}

	public SolutionFaceProductMixStoreTypePK(SolutionFaceProductMix solutionFaceProductMix, StoreType storeType) {
		this.solutionFaceProductMix = solutionFaceProductMix;
		this.storeType = storeType;
	}

	public SolutionFaceProductMix getSolutionFaceProductMix() {
		return solutionFaceProductMix;
	}

	public void setSolutionFaceProductMix(SolutionFaceProductMix solutionFaceProductMix) {
		this.solutionFaceProductMix = solutionFaceProductMix;
	}

	public StoreType getStoreType() {
		return storeType;
	}

	public void setStoreType(StoreType storeType) {
		this.storeType = storeType;
	}
	@Override
	public int hashCode() {
		return this.solutionFaceProductMix.hashCode() + this.storeType.hashCode();
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		final SolutionFaceProductMixStoreTypePK other = (SolutionFaceProductMixStoreTypePK) obj;
		if (solutionFaceProductMix.getId() == other.getSolutionFaceProductMix().getId() &&
				storeType.getId() == other.getStoreType().getId()) {
			return true;
		} 
		return false;
	}
}


